<?php

namespace common\service;

/**
 * 常量基类
 * Class ConstantService
 * @package common\service
 */
class ConstantService extends BaseService
{
    /**
     * 响应失败
     * @var int
     */
    public static $response_fail = -1;

    /**
     * 响应成功
     * @var int
     */
    public static $response_success = 200;
    /**
     * 列表响应成功
     * @var int
     */
    public static $response_tab_success = 0;

    /**
     * 微信小程序需要调用授权接口
     * @var int
     */
    public static $response_fail_auth = -101;

    /**
     * 订单变量
     * @var array
     */
    public static $order_status = [
        // 0,待支付,1代发货,2已发货,3,待收货,4退货中,5,已完成,6关闭,7拼团中
        'PAY_WAIT'  =>  0,
        'WAIT_DELIVER' => 1,
        'DELIVERED' => 2,
        'WAIT_RECEIPT' => 3,
        'RETURNED_PURCHASE' => 4,
        'SUCCESS' => 5,
        'CLOSED' => 6,
        'GROUPING' => 7,
    ];

    /**
     * 活动状态
     * @var array
     */
    public static $active_type = [
        '普通',
        '限时团',
        '店长推荐',
        '热门活动',
        '新品上线',
    ];
    /**
     * 支付状态
     * @var array
     */
    public static $pay_status = [
        'WAIT_PAY'      =>  0,
        'PAY_SUCCESS'   =>  1,
        'PAY_FAIL'   =>  2,
    ];

    /**
     * 申请提现状态
     * @var array
     */
    public static $withdraw_status = [
        'WAIT_CONFIRM' =>0,
        'FAIL' => 1,
        'PRESENT' => 2,
        'COMPLETED' => 3,
        'CLOSE' => 4,
//        申请状态 0 待审核 1未通过 2提现中 3已完成 4提现失败
    ];

    public static  $bank_code = [
        '1001' => '招商银行',
        '1002' => '工商银行',
        '1003' => '建设银行',
        '1004' => '浦发银行',
        '1005' => '农业银行',
        '1006' => '民生银行',
        '1009' => '兴业银行',
        '1010' => '平安银行',
        '1020' => '交通银行',
        '1021' => '中信银行',
        '1022' => '光大银行',
        '1025' => '华夏银行',
        '1026' => '中国银行',
        '1027' => '广发银行',
        '1032' => '北京银行',
        '1056' => '宁波银行',
        '1066' => '邮储银行',
    ];

    /**
     * 默认平台手续费
     */
    public static $service_rate = 3;

    /**
     * 设置redis key
     * @var string
     */
    public static $redis_key = 'xhr_goods_';
}